package guda.shop.core.entity.base;

import guda.shop.core.entity.User;

import java.io.Serializable;
import java.util.Date;

public abstract class BaseUser
        implements Serializable {
    private static final long serialVersionUID = 1L;
    public static String REF = "User";
    public static String PROP_LOGIN_COUNT = "loginCount";
    public static String PROP_LAST_LOGIN_IP = "lastLoginIp";
    public static String PROP_CREATE_TIME = "createTime";
    public static String PROP_RESET_KEY = "resetKey";
    public static String PROP_LAST_LOGIN_TIME = "lastLoginTime";
    public static String PROP_RESET_PWD = "resetPwd";
    public static String PROP_PASSWORD = "password";
    public static String PROP_EMAIL = "email";
    public static String PROP_CURRENT_LOGIN_TIME = "currentLoginTime";
    public static String PROP_CURRENT_LOGIN_IP = "currentLoginIp";
    public static String PROP_REGISTER_IP = "registerIp";
    public static String PROP_ID = "id";
    public static String PROP_USERNAME = "username";
    private int uuid = -2147483648;
    private Long id;
    private String username;
    private String email;
    private String password;
    private Date createTime;
    private Long loginCount;
    private String registerIp;
    private Date lastLoginTime;
    private String lastLoginIp;
    private Date currentLoginTime;
    private String currentLoginIp;
    private String resetKey;
    private String resetPwd;

    public BaseUser() {
        initialize();
    }

    public BaseUser(Long paramLong) {
        setId(paramLong);
        initialize();
    }

    public BaseUser(Long paramLong1, String paramString1, String paramString2, Date paramDate, Long paramLong2) {
        setId(paramLong1);
        setUsername(paramString1);
        setPassword(paramString2);
        setCreateTime(paramDate);
        setLoginCount(paramLong2);
        initialize();
    }

    protected void initialize() {
    }

    public Long getId() {
        return this.id;
    }

    public void setId(Long paramLong) {
        this.id = paramLong;
        this.uuid = -2147483648;
    }

    public String getUsername() {
        return this.username;
    }

    public void setUsername(String paramString) {
        this.username = paramString;
    }

    public String getEmail() {
        return this.email;
    }

    public void setEmail(String paramString) {
        this.email = paramString;
    }

    public String getPassword() {
        return this.password;
    }

    public void setPassword(String paramString) {
        this.password = paramString;
    }

    public Date getCreateTime() {
        return this.createTime;
    }

    public void setCreateTime(Date paramDate) {
        this.createTime = paramDate;
    }

    public Long getLoginCount() {
        return this.loginCount;
    }

    public void setLoginCount(Long paramLong) {
        this.loginCount = paramLong;
    }

    public String getRegisterIp() {
        return this.registerIp;
    }

    public void setRegisterIp(String paramString) {
        this.registerIp = paramString;
    }

    public Date getLastLoginTime() {
        return this.lastLoginTime;
    }

    public void setLastLoginTime(Date paramDate) {
        this.lastLoginTime = paramDate;
    }

    public String getLastLoginIp() {
        return this.lastLoginIp;
    }

    public void setLastLoginIp(String paramString) {
        this.lastLoginIp = paramString;
    }

    public Date getCurrentLoginTime() {
        return this.currentLoginTime;
    }

    public void setCurrentLoginTime(Date paramDate) {
        this.currentLoginTime = paramDate;
    }

    public String getCurrentLoginIp() {
        return this.currentLoginIp;
    }

    public void setCurrentLoginIp(String paramString) {
        this.currentLoginIp = paramString;
    }

    public String getResetKey() {
        return this.resetKey;
    }

    public void setResetKey(String paramString) {
        this.resetKey = paramString;
    }

    public String getResetPwd() {
        return this.resetPwd;
    }

    public void setResetPwd(String paramString) {
        this.resetPwd = paramString;
    }

    public boolean equals(Object paramObject) {
        if (null == paramObject)
            return false;
        if (!(paramObject instanceof User))
            return false;
        User localUser = (User) paramObject;
        if ((null == getId()) || (null == localUser.getId()))
            return false;
        return getId().equals(localUser.getId());
    }

    public int hashCode() {
        if (-2147483648 == this.uuid) {
            if (null == getId())
                return super.hashCode();
            String str = getClass().getName() + ":" + getId().hashCode();
            this.uuid = str.hashCode();
        }
        return this.uuid;
    }

    public String toString() {
        return super.toString();
    }
}

